<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupAddress</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch06.html" title="Low-level Networking API">
<link rel="prev" href="ch06.html" title="Low-level Networking API">
<link rel="next" href="SoupSocket.html" title="SoupSocket">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch06.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="SoupSocket.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupAddress.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupAddress.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupAddress.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#SoupAddress.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#SoupAddress.properties" class="shortcut">Properties</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupAddress"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupAddress.top_of_page"></a>SoupAddress</span></h2>
<p>SoupAddress — DNS support</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupAddress.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupAddress.html#SoupAddress-struct" title="SoupAddress">SoupAddress</a>;
enum                <a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily">SoupAddressFamily</a>;
#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-ANY-PORT:CAPS" title="SOUP_ADDRESS_ANY_PORT">SOUP_ADDRESS_ANY_PORT</a>
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupAddress.html#soup-address-new" title="soup_address_new ()">soup_address_new</a>                    (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupAddress.html#soup-address-new-from-sockaddr" title="soup_address_new_from_sockaddr ()">soup_address_new_from_sockaddr</a>      (<em class="parameter"><code><span class="type">struct sockaddr</span> *sa</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> len</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupAddress.html#soup-address-new-any" title="soup_address_new_any ()">soup_address_new_any</a>                (<em class="parameter"><code><a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily"><span class="type">SoupAddressFamily</span></a> family</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="SoupAddress.html#SoupAddressCallback" title="SoupAddressCallback ()">*SoupAddressCallback</a>)              (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()">soup_address_resolve_async</a>          (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *async_context</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAddress.html#SoupAddressCallback" title="SoupAddressCallback ()"><span class="type">SoupAddressCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupAddress.html#soup-address-resolve-sync" title="soup_address_resolve_sync ()">soup_address_resolve_sync</a>           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAddress.html#soup-address-is-resolved" title="soup_address_is_resolved ()">soup_address_is_resolved</a>            (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);

const <span class="returnvalue">char</span> *        <a class="link" href="SoupAddress.html#soup-address-get-name" title="soup_address_get_name ()">soup_address_get_name</a>               (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);
struct <span class="returnvalue">sockaddr</span> *   <a class="link" href="SoupAddress.html#soup-address-get-sockaddr" title="soup_address_get_sockaddr ()">soup_address_get_sockaddr</a>           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *len</code></em>);
<a href="http://library.gnome.org/devel/gio/unstable/GSocketAddress.html"><span class="returnvalue">GSocketAddress</span></a> *    <a class="link" href="SoupAddress.html#soup-address-get-gsockaddr" title="soup_address_get_gsockaddr ()">soup_address_get_gsockaddr</a>          (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);
const <span class="returnvalue">char</span> *        <a class="link" href="SoupAddress.html#soup-address-get-physical" title="soup_address_get_physical ()">soup_address_get_physical</a>           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupAddress.html#soup-address-get-port" title="soup_address_get_port ()">soup_address_get_port</a>               (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAddress.html#soup-address-equal-by-name" title="soup_address_equal_by_name ()">soup_address_equal_by_name</a>          (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr1</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr2</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupAddress.html#soup-address-hash-by-name" title="soup_address_hash_by_name ()">soup_address_hash_by_name</a>           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupAddress.html#soup-address-equal-by-ip" title="soup_address_equal_by_ip ()">soup_address_equal_by_ip</a>            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr1</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr2</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupAddress.html#soup-address-hash-by-ip" title="soup_address_hash_by_ip ()">soup_address_hash_by_ip</a>             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>);

#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-FAMILY:CAPS" title="SOUP_ADDRESS_FAMILY">SOUP_ADDRESS_FAMILY</a>
#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-NAME:CAPS" title="SOUP_ADDRESS_NAME">SOUP_ADDRESS_NAME</a>
#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-PHYSICAL:CAPS" title="SOUP_ADDRESS_PHYSICAL">SOUP_ADDRESS_PHYSICAL</a>
#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-PORT:CAPS" title="SOUP_ADDRESS_PORT">SOUP_ADDRESS_PORT</a>
#define             <a class="link" href="SoupAddress.html#SOUP-ADDRESS-SOCKADDR:CAPS" title="SOUP_ADDRESS_SOCKADDR">SOUP_ADDRESS_SOCKADDR</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupAddress.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----SoupAddress
</pre>
</div>
<div class="refsect1">
<a name="SoupAddress.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
SoupAddress implements
 <a href="http://library.gnome.org/devel/gio/unstable/GSocketConnectable.html">GSocketConnectable</a>.</p>
</div>
<div class="refsect1">
<a name="SoupAddress.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="SoupAddress.html#SoupAddress--family" title='The "family" property'>family</a>"                   <a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily"><span class="type">SoupAddressFamily</span></a>     : Read / Write / Construct Only
  "<a class="link" href="SoupAddress.html#SoupAddress--name" title='The "name" property'>name</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupAddress.html#SoupAddress--physical" title='The "physical" property'>physical</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read
  "<a class="link" href="SoupAddress.html#SoupAddress--port" title='The "port" property'>port</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct Only
  "<a class="link" href="SoupAddress.html#SoupAddress--protocol" title='The "protocol" property'>protocol</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only
  "<a class="link" href="SoupAddress.html#SoupAddress--sockaddr" title='The "sockaddr" property'>sockaddr</a>"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="SoupAddress.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> represents the address of a TCP connection endpoint:
both the IP address and the port. (It is somewhat like an
object-oriented version of struct sockaddr.)
</p>
</div>
<div class="refsect1">
<a name="SoupAddress.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupAddress-struct"></a><h3>SoupAddress</h3>
<pre class="programlisting">typedef struct _SoupAddress SoupAddress;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddressFamily"></a><h3>enum SoupAddressFamily</h3>
<pre class="programlisting">typedef enum {
	SOUP_ADDRESS_FAMILY_INVALID = -1,

	SOUP_ADDRESS_FAMILY_IPV4 = G_SOCKET_FAMILY_IPV4,
	SOUP_ADDRESS_FAMILY_IPV6 = G_SOCKET_FAMILY_IPV6
} SoupAddressFamily;
</pre>
<p>
The supported address families.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-ADDRESS-FAMILY-INVALID:CAPS"></a><span class="term"><code class="literal">SOUP_ADDRESS_FAMILY_INVALID</code></span></p></td>
<td>an invalid <a class="link" href="SoupAddress.html" title="SoupAddress"><code class="literal">SoupAddress</code></a>
</td>
</tr>
<tr>
<td><p><a name="SOUP-ADDRESS-FAMILY-IPV4:CAPS"></a><span class="term"><code class="literal">SOUP_ADDRESS_FAMILY_IPV4</code></span></p></td>
<td>an IPv4 address
</td>
</tr>
<tr>
<td><p><a name="SOUP-ADDRESS-FAMILY-IPV6:CAPS"></a><span class="term"><code class="literal">SOUP_ADDRESS_FAMILY_IPV6</code></span></p></td>
<td>an IPv6 address
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-ANY-PORT:CAPS"></a><h3>SOUP_ADDRESS_ANY_PORT</h3>
<pre class="programlisting">#define SOUP_ADDRESS_ANY_PORT 0
</pre>
<p>
This can be passed to any <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> method that expects a port,
to indicate that you don't care what port is used.
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-new"></a><h3>soup_address_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_address_new                    (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);</pre>
<p>
Creates a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> from <em class="parameter"><code>name</code></em> and <em class="parameter"><code>port</code></em>. The <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>'s IP
address may not be available right away; the caller can call
<a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()"><code class="function">soup_address_resolve_async()</code></a> or <a class="link" href="SoupAddress.html#soup-address-resolve-sync" title="soup_address_resolve_sync ()"><code class="function">soup_address_resolve_sync()</code></a> to
force a DNS resolution.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>a hostname or physical address</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>a port number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-new-from-sockaddr"></a><h3>soup_address_new_from_sockaddr ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_address_new_from_sockaddr      (<em class="parameter"><code><span class="type">struct sockaddr</span> *sa</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> len</code></em>);</pre>
<p>
Returns a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> equivalent to <em class="parameter"><code>sa</code></em> (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>sa</code></em>'s
address family isn't supported)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sa</code></em> :</span></p></td>
<td>a pointer to a sockaddr</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>sa</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-new-any"></a><h3>soup_address_new_any ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_address_new_any                (<em class="parameter"><code><a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily"><span class="type">SoupAddressFamily</span></a> family</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);</pre>
<p>
Returns a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> corresponding to the "any" address
for <em class="parameter"><code>family</code></em> (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>family</code></em> isn't supported), suitable for
using as a listening <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>family</code></em> :</span></p></td>
<td>the address family</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>the port number (usually <a class="link" href="SoupAddress.html#SOUP-ADDRESS-ANY-PORT:CAPS" title="SOUP_ADDRESS_ANY_PORT"><code class="literal">SOUP_ADDRESS_ANY_PORT</code></a>)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddressCallback"></a><h3>SoupAddressCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*SoupAddressCallback)              (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The callback function passed to <a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()"><code class="function">soup_address_resolve_async()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> that was resolved</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-OK:CAPS"><code class="literal">SOUP_STATUS_OK</code></a>, <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANT-RESOLVE:CAPS"><code class="literal">SOUP_STATUS_CANT_RESOLVE</code></a>, or
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the user data that was passed to
<a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()"><code class="function">soup_address_resolve_async()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-resolve-async"></a><h3>soup_address_resolve_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_address_resolve_async          (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *async_context</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupAddress.html#SoupAddressCallback" title="SoupAddressCallback ()"><span class="type">SoupAddressCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Asynchronously resolves the missing half of <em class="parameter"><code>addr</code></em> (its IP address
if it was created with <a class="link" href="SoupAddress.html#soup-address-new" title="soup_address_new ()"><code class="function">soup_address_new()</code></a>, or its hostname if it
was created with <a class="link" href="SoupAddress.html#soup-address-new-from-sockaddr" title="soup_address_new_from_sockaddr ()"><code class="function">soup_address_new_from_sockaddr()</code></a> or
<a class="link" href="SoupAddress.html#soup-address-new-any" title="soup_address_new_any ()"><code class="function">soup_address_new_any()</code></a>.)
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
resolution. <em class="parameter"><code>callback</code></em> will still be invoked in this case, with a
status of <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<p>
It is safe to call this more than once on a given address, from the
same thread, with the same <em class="parameter"><code>async_context</code></em> (and doing so will not
result in redundant DNS queries being made). But it is not safe to
call from multiple threads, or with different <em class="parameter"><code>async_contexts</code></em>, or
mixed with calls to <a class="link" href="SoupAddress.html#soup-address-resolve-sync" title="soup_address_resolve_sync ()"><code class="function">soup_address_resolve_sync()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>async_context</code></em> :</span></p></td>
<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> to call <em class="parameter"><code>callback</code></em> from. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call with the result. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data for <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-resolve-sync"></a><h3>soup_address_resolve_sync ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_address_resolve_sync           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Synchronously resolves the missing half of <em class="parameter"><code>addr</code></em>, as with
<a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()"><code class="function">soup_address_resolve_async()</code></a>.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
resolution. <a class="link" href="SoupAddress.html#soup-address-resolve-sync" title="soup_address_resolve_sync ()"><code class="function">soup_address_resolve_sync()</code></a> will then return a status
of <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<p>
It is safe to call this more than once, even from different
threads, but it is not safe to mix calls to
<a class="link" href="SoupAddress.html#soup-address-resolve-sync" title="soup_address_resolve_sync ()"><code class="function">soup_address_resolve_sync()</code></a> with calls to
<a class="link" href="SoupAddress.html#soup-address-resolve-async" title="soup_address_resolve_async ()"><code class="function">soup_address_resolve_async()</code></a> on the same address.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-OK:CAPS"><code class="literal">SOUP_STATUS_OK</code></a>, <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANT-RESOLVE:CAPS"><code class="literal">SOUP_STATUS_CANT_RESOLVE</code></a>, or
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-is-resolved"></a><h3>soup_address_is_resolved ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_address_is_resolved            (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>addr</code></em> has already been resolved. Unlike the other
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> "get" methods, this is safe to call when <em class="parameter"><code>addr</code></em> might
be being resolved in another thread.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>addr</code></em> has been resolved.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-get-name"></a><h3>soup_address_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_address_get_name               (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);</pre>
<p>
Returns the hostname associated with <em class="parameter"><code>addr</code></em>.
</p>
<p>
This method is not thread-safe; if you call it while <em class="parameter"><code>addr</code></em> is being
resolved in another thread, it may return garbage. You can use
<a class="link" href="SoupAddress.html#soup-address-is-resolved" title="soup_address_is_resolved ()"><code class="function">soup_address_is_resolved()</code></a> to safely test whether or not an address
is resolved before fetching its name or address.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the hostname, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it is not known. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-get-sockaddr"></a><h3>soup_address_get_sockaddr ()</h3>
<pre class="programlisting">struct <span class="returnvalue">sockaddr</span> *   soup_address_get_sockaddr           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> *len</code></em>);</pre>
<p>
Returns the sockaddr associated with <em class="parameter"><code>addr</code></em>, with its length in
*<em class="parameter"><code>len</code></em>. If the sockaddr is not yet known, returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
This method is not thread-safe; if you call it while <em class="parameter"><code>addr</code></em> is being
resolved in another thread, it may return garbage. You can use
<a class="link" href="SoupAddress.html#soup-address-is-resolved" title="soup_address_is_resolved ()"><code class="function">soup_address_is_resolved()</code></a> to safely test whether or not an address
is resolved before fetching its name or address.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>return location for sockaddr length</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the sockaddr, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-get-gsockaddr"></a><h3>soup_address_get_gsockaddr ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gio/unstable/GSocketAddress.html"><span class="returnvalue">GSocketAddress</span></a> *    soup_address_get_gsockaddr          (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);</pre>
<p>
Creates a new <a href="http://library.gnome.org/devel/gio/unstable/GSocketAddress.html"><span class="type">GSocketAddress</span></a> corresponding to <em class="parameter"><code>addr</code></em> (which is assumed
to only have one socket address associated with it).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a href="http://library.gnome.org/devel/gio/unstable/GSocketAddress.html"><span class="type">GSocketAddress</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-get-physical"></a><h3>soup_address_get_physical ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        soup_address_get_physical           (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);</pre>
<p>
Returns the physical address associated with <em class="parameter"><code>addr</code></em> as a string.
(Eg, "127.0.0.1"). If the address is not yet known, returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<p>
This method is not thread-safe; if you call it while <em class="parameter"><code>addr</code></em> is being
resolved in another thread, it may return garbage. You can use
<a class="link" href="SoupAddress.html#soup-address-is-resolved" title="soup_address_is_resolved ()"><code class="function">soup_address_is_resolved()</code></a> to safely test whether or not an address
is resolved before fetching its name or address.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the physical address, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-get-port"></a><h3>soup_address_get_port ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_address_get_port               (<em class="parameter"><code><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> *addr</code></em>);</pre>
<p>
Returns the port associated with <em class="parameter"><code>addr</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the port</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-equal-by-name"></a><h3>soup_address_equal_by_name ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_address_equal_by_name          (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr1</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr2</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>addr1</code></em> and <em class="parameter"><code>addr2</code></em> have the same "name". This method can be
used with <a class="link" href="SoupAddress.html#soup-address-hash-by-name" title="soup_address_hash_by_name ()"><code class="function">soup_address_hash_by_name()</code></a> to create a <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> that
hashes on address "names".
</p>
<p>
Comparing by name normally means comparing the addresses by their
hostnames. But if the address was originally created using an IP
address literal, then it will be compared by that instead.
</p>
<p>
In particular, if "www.example.com" has the IP address 10.0.0.1,
and <em class="parameter"><code>addr1</code></em> was created with the name "www.example.com" and <em class="parameter"><code>addr2</code></em>
was created with the name "10.0.0.1", then they will compare as
unequal for purposes of <a class="link" href="SoupAddress.html#soup-address-equal-by-name" title="soup_address_equal_by_name ()"><code class="function">soup_address_equal_by_name()</code></a>.
</p>
<p>
This would be used to distinguish hosts in situations where
different virtual hosts on the same IP address should be considered
different. Eg, for purposes of HTTP authentication or cookies, two
hosts with the same IP address but different names are considered
to be different hosts.
</p>
<p>
See also <a class="link" href="SoupAddress.html#soup-address-equal-by-ip" title="soup_address_equal_by_ip ()"><code class="function">soup_address_equal_by_ip()</code></a>, which compares by IP address
rather than by name.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr1</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> with a resolved name. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr2</code></em> :</span></p></td>
<td>another <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> with a resolved
name. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether or not <em class="parameter"><code>addr1</code></em> and <em class="parameter"><code>addr2</code></em> have the same name</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-hash-by-name"></a><h3>soup_address_hash_by_name ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_address_hash_by_name           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>);</pre>
<p>
A hash function (for <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>) that corresponds to
<a class="link" href="SoupAddress.html#soup-address-equal-by-name" title="soup_address_equal_by_name ()"><code class="function">soup_address_equal_by_name()</code></a>, qv
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the named-based hash value for <em class="parameter"><code>addr</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-equal-by-ip"></a><h3>soup_address_equal_by_ip ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_address_equal_by_ip            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr1</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr2</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>addr1</code></em> and <em class="parameter"><code>addr2</code></em> have the same IP address. This method
can be used with <a class="link" href="SoupAddress.html#soup-address-hash-by-ip" title="soup_address_hash_by_ip ()"><code class="function">soup_address_hash_by_ip()</code></a> to create a
<a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> that hashes on IP address.
</p>
<p>
This would be used to distinguish hosts in situations where
different virtual hosts on the same IP address should be considered
the same. Eg, if "www.example.com" and "www.example.net" have the
same IP address, then a single connection can be used to talk
to either of them.
</p>
<p>
See also <a class="link" href="SoupAddress.html#soup-address-equal-by-name" title="soup_address_equal_by_name ()"><code class="function">soup_address_equal_by_name()</code></a>, which compares by name
rather than by IP address.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr1</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> with a resolved IP
address. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr2</code></em> :</span></p></td>
<td>another <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> with a resolved
IP address. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether or not <em class="parameter"><code>addr1</code></em> and <em class="parameter"><code>addr2</code></em> have the same IP
address.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-address-hash-by-ip"></a><h3>soup_address_hash_by_ip ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_address_hash_by_ip             (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> addr</code></em>);</pre>
<p>
A hash function (for <a href="http://library.gnome.org/devel/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>) that corresponds to
<a class="link" href="SoupAddress.html#soup-address-equal-by-ip" title="soup_address_equal_by_ip ()"><code class="function">soup_address_equal_by_ip()</code></a>, qv
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td>
<td>a <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> Soup.Address]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the IP-based hash value for <em class="parameter"><code>addr</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-FAMILY:CAPS"></a><h3>SOUP_ADDRESS_FAMILY</h3>
<pre class="programlisting">#define SOUP_ADDRESS_FAMILY   "family"
</pre>
<p>
Alias for the <a class="link" href="SoupAddress.html#SoupAddress--family" title='The "family" property'><span class="type">"family"</span></a> property. (The
<a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily"><span class="type">SoupAddressFamily</span></a> for this address.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-NAME:CAPS"></a><h3>SOUP_ADDRESS_NAME</h3>
<pre class="programlisting">#define SOUP_ADDRESS_NAME     "name"
</pre>
<p>
Alias for the <a class="link" href="SoupAddress.html#SoupAddress--name" title='The "name" property'><span class="type">"name"</span></a> property. (The hostname for
this address.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-PHYSICAL:CAPS"></a><h3>SOUP_ADDRESS_PHYSICAL</h3>
<pre class="programlisting">#define SOUP_ADDRESS_PHYSICAL "physical"
</pre>
<p>
An alias for the <a class="link" href="SoupAddress.html#SoupAddress--physical" title='The "physical" property'><span class="type">"physical"</span></a> property. (The
stringified IP address for this address.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-PORT:CAPS"></a><h3>SOUP_ADDRESS_PORT</h3>
<pre class="programlisting">#define SOUP_ADDRESS_PORT     "port"
</pre>
<p>
An alias for the <a class="link" href="SoupAddress.html#SoupAddress--port" title='The "port" property'><span class="type">"port"</span></a> property. (The port for
this address.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-ADDRESS-SOCKADDR:CAPS"></a><h3>SOUP_ADDRESS_SOCKADDR</h3>
<pre class="programlisting">#define SOUP_ADDRESS_SOCKADDR "sockaddr"
</pre>
<p>
An alias for the <a class="link" href="SoupAddress.html#SoupAddress--sockaddr" title='The "sockaddr" property'><span class="type">"sockaddr"</span></a> property. (A pointer
to the struct sockaddr for this address.)
</p>
</div>
</div>
<div class="refsect1">
<a name="SoupAddress.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupAddress--family"></a><h3>The <code class="literal">"family"</code> property</h3>
<pre class="programlisting">  "family"                   <a class="link" href="SoupAddress.html#SoupAddressFamily" title="enum SoupAddressFamily"><span class="type">SoupAddressFamily</span></a>     : Read / Write / Construct Only</pre>
<p>Address family for this address.</p>
<p>Default value: SOUP_ADDRESS_FAMILY_INVALID</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddress--name"></a><h3>The <code class="literal">"name"</code> property</h3>
<pre class="programlisting">  "name"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>Hostname for this address.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddress--physical"></a><h3>The <code class="literal">"physical"</code> property</h3>
<pre class="programlisting">  "physical"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read</pre>
<p>IP address for this address.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddress--port"></a><h3>The <code class="literal">"port"</code> property</h3>
<pre class="programlisting">  "port"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write / Construct Only</pre>
<p>Port for this address.</p>
<p>Allowed values: [G_MAXULONG,65535]</p>
<p>Default value: -1</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddress--protocol"></a><h3>The <code class="literal">"protocol"</code> property</h3>
<pre class="programlisting">  "protocol"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct Only</pre>
<p>URI scheme for this address.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupAddress--sockaddr"></a><h3>The <code class="literal">"sockaddr"</code> property</h3>
<pre class="programlisting">  "sockaddr"                 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only</pre>
<p>struct sockaddr for this address.</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>